package jaux.tank.bean.vo;

import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("实体元数据")
public class EntityMetadata {

	@ApiModelProperty("实体名称")
	private String name;
	
	@ApiModelProperty("swagger模型名称")
	private String apiModel;
	
	@ApiModelProperty("实体类名称")
	private String clazz;
	
	@ApiModelProperty("实体属性列表")
	private AttributeMetadata[] attrs;
	
	@ApiModel("实体属性元数据")
	public class AttributeMetadata{
		
		@ApiModelProperty("属性名称")
		private String name;
		
		@ApiModelProperty("swagger模型属性名称")
		private String apiModelProp;
		
		@ApiModelProperty("属性类名称")
		private String clazz;
		
		@ApiModelProperty("是否为关联属性")
		private boolean association;
		
		@ApiModelProperty("持久化类型")
		private String persistentType;
		
		@ApiModelProperty("是否为集合类型")
		private boolean collectionAttr;
		
		@ApiModelProperty("是否为枚举类型")
		private boolean enumAttr;
		
		@ApiModelProperty("关联实体名称")
		private String entity;
		
		@ApiModelProperty("元素类名称")
		private String elementClazz;
		
		@ApiModelProperty("允许的值")
		private Object[] allowableValues;
		
		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getApiModelProp() {
			return apiModelProp;
		}

		public void setApiModelProp(String apiModelProp) {
			this.apiModelProp = apiModelProp;
		}

		public String getClazz() {
			return clazz;
		}

		public void setClazz(String clazz) {
			this.clazz = clazz;
		}

		public boolean isAssociation() {
			return association;
		}

		public void setAssociation(boolean association) {
			this.association = association;
		}

		public String getPersistentType() {
			return persistentType;
		}

		public void setPersistentType(String persistentType) {
			this.persistentType = persistentType;
		}

		public boolean isCollectionAttr() {
			return collectionAttr;
		}

		public void setCollectionAttr(boolean collectionAttr) {
			this.collectionAttr = collectionAttr;
		}

		public boolean isEnumAttr() {
			return enumAttr;
		}

		public void setEnumAttr(boolean enumAttr) {
			this.enumAttr = enumAttr;
		}

		public String getEntity() {
			return entity;
		}

		public void setEntity(String entity) {
			this.entity = entity;
		}

		public String getElementClazz() {
			return elementClazz;
		}

		public void setElementClazz(String elementClazz) {
			this.elementClazz = elementClazz;
		}

		public Object[] getAllowableValues() {
			return allowableValues;
		}

		public void setAllowableValues(Object[] allowableValues) {
			this.allowableValues = allowableValues;
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getApiModel() {
		return apiModel;
	}

	public void setApiModel(String apiModel) {
		this.apiModel = apiModel;
	}

	public String getClazz() {
		return clazz;
	}

	public void setClazz(String clazz) {
		this.clazz = clazz;
	}

	public AttributeMetadata[] getAttrs() {
		return attrs;
	}

	public void setAttrs(AttributeMetadata[] attrs) {
		this.attrs = attrs;
	}

}
